package com.lb.action;


import java.util.List;

import javax.servlet.ServletRequest;

import org.apache.struts2.ServletActionContext;


import com.lb.bean.User;
import com.lb.service.AdminService;

import com.opensymphony.xwork2.ActionSupport;

public class UserShowAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	private AdminService service;
	private List<User> usershow;
	
	
	


	public AdminService getService() {
		return service;
	}





	public void setService(AdminService service) {
		this.service = service;
	}





	public List<User> getUsershow() {
		return usershow;
	}





	public void setUsershow(List<User> usershow) {
		this.usershow = usershow;
	}





	public String execute() throws Exception {
		this.clearActionErrors();	

		ServletRequest request=ServletActionContext.getRequest();
		int userId=Integer.parseInt(request.getParameter("userId")); 
	    usershow=this.service.findUserByUserId(userId);
		return SUCCESS;
	
	}
}


